-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate the Body's highlight variant to semibold #2750
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2750 +/- ##
=======================================
Coverage 87.28% 87.28%
=======================================
Files 212 212
Lines 12481 12481
Branches 1678 1678
=======================================
Hits 10894 10894
Misses 1535 1535
Partials 52 52 |
Size Change: +3 B (0%) Total Size: 639 kB
ℹ️ View Unchanged
|
const asAttribute = findAttribute(node, 'as'); | ||
const weightAttribute = findAttribute(node, 'weight'); | ||
const replacement = asAttribute ? 'weight="semibold"' : `as="strong"`; | ||
context.report({ | ||
node: attribute, | ||
messageId: 'bodyVariant', | ||
data: { component, current, replacement }, | ||
fix: weightAttribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean that if we have a weight attribute besides the variant, we do nothing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't apply a fix, but the issue is still flagged. I decided to add this back in case of custom props on styled components.
Purpose
During the design review of the new typography, we noticed that the Body's bold weight has too much visual weight and should be reduced to semibold.
Approach and changes
strong
elements andvariant="highlight"
as semibold instead of boldvariant="highlight"
prop toas="strong"
, leaving out the superfluousweight="semibold"
.weight="bold"
Definition of done